%%\def\filename{german.sty}
%%\def\fileversion{2.4a}
%%\def\filedate{92/04/12}
%%\def\docdate{92/04/12}
%%
%% This is GERMAN.TEX or GERMAN.STY, Vers. 2.4a, 12 Apr 1991
%
%    maintained by Bernd Raichle (Uni Stuttgart)
%    using ideas by H.Partl (TU Wien, Uni.f.Bodenkultur Wien),
%    W.Appelt, F.Hommes et al. (GMD St.Augustin),
%    T.Hofmann (CIBA-GEIGY Basel), N.Schwarz (Uni Bochum),
%    J.Schrod (TH Darmstadt), D.Armbruster (Uni Stuttgart),
%    R.Sch\"opf (Uni Mainz, Uni Heidelberg, ZIB Berlin),
%    F.Mittelbach (Uni Mainz, EDS R\"usselsheim),
%    J.Knappen (Uni Mainz), P.Breitenlohner (MPI M\"unchen)
%    and many others.
%%
%% DOCUMENT STYLE OPTION for writing german texts
%% with TeX version 2.x/3.x (Plain TeX) or with LaTeX version 2.09.
%%
%%
%% Copying of this file is authorized only if either
%% (1) you make absolutely no changes to your copy, including name, or
%% (2) if you do make changes, you name it something other than
%%     german.doc, german.tex or german.sty.
%% This restriction helps ensure that all styles developed for
%% DANTE e.V. (the users group of german speaking TeX users)
%% remain identical.
%%
%
% Error reports please to:
%         Bernd Raichle
%         Stettener Str. 73
%         W-7300 Esslingen
%         Federal Republic of Germany
% Email:  raichle@azu.Informatik.Uni-Stuttgart.DE
%
%
% It can be called via
%    \input german
% or (with LaTeX) via
%    \documentstyle[german]{anystyle}
%
% This file conforms to the standard for ``Einheitliche deutsche
% TeX-Befehle'' as proposed at the 6th Meeting of German TeX Users
% in M\"unster, October 1987.
% It is available from DANTE by:
%  * anonymous ftp: rusinfo.rus.uni-stuttgart.de [129.69.1.12]
%        in soft/tex/latex-style-supported/german
%  * E-mail: send a message containing the line "help" or
%        "send soft/tex/latex-style-supported/german/german.sty"
%        to  mail-server@rusinfo.rus.uni-stuttgart.de
%  * Bitnet: "get german sty" from Bitnet server listserv@dhdurz1
%
% If you want to join DANTE, contact:
%         DANTE, Deutschsprachige Anwendervereinigung TeX e.V.
%         Postfach 10 18 40
%         W-6900 Heidelberg 1
%         Federal Republic of Germany
% Email:  dante@dhdurz1.bitnet
%     or  dante@vm.urz.uni-heidelberg.de
%
%
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%   !! This style is incompatible with the style files !!
%   !!  written for the ``Babel System'' of J.Braams   !!
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%
%
% Commands to be used by the end users:
% "a                 for Umlaut-a (like \"a), also for all other vowels.
% "s                 for sharp s  (like \ss{}).
% "ck                for ck to be hyphenated as k-k.
% "ff                for ff to be hyphenated as ff-f, also for certain
%                    other consonants.
% "S                 for SS to be \uppercase{"s}.
% "Z                 for special case SZ (use "z for lowercase \ss).
% "A, "CK, "FF etc.  uppercase versions of the above.
% "|                 to separate ligatures.
% "-                 like \-, but allowing hyphenation in the rest of
%                    the word (i.e., in the parts before and after the
%                    hyphenation point added by "-)
% ""                 like "-, but producing no hyphen sign (for x-""y).
% "~                 for an unbreakable hyphen (for `bergauf und "~ab').
% "=                 for an explicit hyphen, allowing hyphenation in
%                    the rest of the word.
% "` or \glqq        for german left  double quotes   (similar to ,,)
% "' or \grqq        for german right double quotes   (similar to ``)
%       \glq         for german left  single quotes   (similar to , )
%       \grq         for german right single quotes   (similar to ` )
% "< or \flqq        for french left  double quotes   (similar to <<)
% "> or \frqq        for french right double quotes   (similar to >>)
%       \flq         for (french) left  single quotes (similar to < )
%       \frq         for (french) right single quotes (similar to > )
% \dq                for the original quotes character (")
% \selectlanguage{n} to select the main language of the document,
%                    specified by the language name <n>, which should
%                    be one of the following names:
%                    german, austrian, USenglish, english, french;
%                    - this changes the date format, captions and (if
%                    `german.sty' is properly installed) hyphenation.
%                    To be compatible with older versions of german.sty
%                    it is allowed to specify the names as control
%                    sequences (e.g. \german).
% \originalTeX       to restore everything to the original settings
%                    of TeX and LaTeX (well, almost everything).
% \germanTeX         to re-activate the german settings.
%
%
% Obsolete commands, provided for compatibility with existing
% applications:
% \3                 for sharp s (like "s).
% \ck                for ck to be hyphenated as k-k (like "ck).
%
%
% Obsolete command, incompatible with the former definition:
% \setlanguage       the former name of \selectlanguage
%                    TeX 3.x introduces a new primitive with the
%                    same name (DO NOT USE \setlanguage!)
%
%
% Lower level commands and features:
% \umlautlow         redefines the Umlaut accent such that the dots come
%                    nearer to the letter and that hyphenation is enabled
%                    in the rest of the word.
% \umlauthigh        restores \" to its original meaning.
% \ss                is \lccode'd to enable hyphenation.
% \mdqon             makes " an active (meta-) character that does the
%                    pretty things described above.
% \mdqoff            restores " to its original meaning.
% \dospecials,\@sanitize  are extended to include the ".
% \dateaustrian, \dategerman, \dateenglish, \dateUSenglish, \datefrench
%                    redefine \today to use the respective date format.
% \captionsgerman, \captionsenglish, \captionsfrench
%                    switch to german, english or french chapter captions
%                    and the like, resp. This will have an effect only
%                    if the document style files use the symbolic names
%                    \chaptername etc. instead of the original english
%                    words. ("International LaTeX")
% \language          a count that may be set by \selectlanguage to switch
%                    hyphenation patterns or other language dependent
%                    items. It is an internal count register in TeX 3.x
%                    and ML-TeX.
%
% Finally, \germanTeX is switched on.
%
%
% Installation:
%
% If you want to get rid of most comments, use the `docstrip' utility,
% which can be found in the `multicol' style-option package.
% You are NOT ALLOWED to distribute the stripped file alone!
%
% When used with TeX 3.x (or MLTeX), IniTeX can load more than one set
% of hyphenation patterns. `german.sty' assumes that the control
% sequence names \l@german, \l@austrian, \l@USenglish, \l@english and
% \l@french specify the values of \language for the language-specific
% set of hyphenation patterns.
% Set these control sequences to correct values when dumping a new
% format with IniTeX, otherwise TeX uses incorrect (or no) hyphenation
% patterns. (If these control sequences are undefined, english/USenglish
% uses \language position 0, german/austrian 1 and french 2.)
%
%
% Notes:
%
% This file can be used both with Plain TeX and with LaTeX and other
% macro packages, and with the original TeX and LaTeX fonts. Usage of
% german hyphenation patterns is recommended to accompany this style
% file when writing german texts.
%
% The file should be read in vertical mode only (usually at the
% beginning of the document) to avoid spurious spaces.
%
% Multiple calls of this file (e.g. at the beginning of each subfile)
% will do no harm. Only the first call (i.e., if \mdqon is undefined)
% performs all the definitions and settings. Later calls only switch
% to \germanTeX.
%
% The catcode of @ remains unchanged after processing of this file.
% All of the definitions are local (except one \newdimen and three
% \newcount), the switching on of the german options is local.
%
% The commands \mdqon, \mdqoff, \originalTeX, \germanTeX, and
% \selectlanguage are ``fragile'' with LaTeX and should not be used
% within arguments of macro calls.
%
% In Plain TeX, `\protect' should be \let to `\relax' normally and to
% something like `\string' inside the arguments of `\write' or
% `\message' (see LaTeX.tex for all the details).
%
% The command \umlautlow may need adaption to font parameters (see
% comments there for details).
%
% The commands \flqq, \frqq, \flq, \frq, and \datefrench in their
% present forms do not work properly with all font sizes and styles,
% they still require a better solution. A LaTeX-only solution might be
% to use {\ly(}, {\ly(\kern-0.166em(}, {\ly)} etc., but this would not
% work with Plain TeX.
%
% The current version has been designed for TeX versions 1 and 2. For
% TeX version 3 or MLTeX (by M. Ferguson) basic support for more than
% one set of hyphenation patterns is included.
%
% Since " has a different catcode (\active) and a different meaning
% than in original TeX, special care has to be taken if " is to be
% used in its original meaning for hexadecimal constants (explicitely,
% or implicitely by math-delimiters or other macros when expanded).
%
%
% Known "Bugs":
%
%  -- If a hexadecimal number begins with a letter, TeX reports
%     ``Missing number, treated as zero''.
%  >> Use "0A0-"0FF instead of "A0-"FF or make sure that the catcode of
%     the doublequote is `other' when reading a hexadecimal constant.
%
%  -- Spaces after active doublequotes are ignored.  E.g. the input of
%     ``M" unster'' produces the same as ``M"unster''.
%  -- The use of things like "} in the text causes an error.
%  -- If a doublequote is followed by a group, e.g. "{a"a}, it is
%     possible that TeX reports ``Missing \endcsname inserted''.
%  >> Use the ''-ligature or "{} or \verb+"+ to produce normal
%     doublequotes.
%
%  -- If an active " is used with an unexpected argument, an error
%     is signalled.  (In older versions of `german.sty' a normal
%     doublequote is typeset without an error or warning.)
%     Example: If you type ``(" Beispiel")'' neither "B nor ") is
%              defined.
%  >> Use ``...'' or "`..."' for (correct) doublequotes.
%

% \ifundefined{mdqon} or \mdqon=\relax
% \then go ahead \else switch to \germanTeX and do nothing
\expandafter\ifx\csname mdqon\endcsname\relax
\else \germanTeX \expandafter\endinput \fi

\message{Document Style Option `german' Version 2.4a of 12 Apr 1992}

% \ifundefined{protect} \then define it
\expandafter\let\expandafter\protect\csname protect\endcsname


% save current category code of `@'
\chardef\atcode=\catcode`\@
\catcode`\@=11 % \makeatletter

% \allowhyphens simulates a word boundary,
% kerning information will be lost!
\def\allowhyphens{\penalty\@M \hskip\z@skip}
%                {\nobreak    \hskip 0pt plus 0pt\relax}

\def\umlauthigh{\def\"##1{{\accent127 ##1}}}
\def\umlautlow{\def\"{\protect\newumlaut}}

% The macro \newumlaut fools the TeX primitive \accent to lower the
% accent character to the base character. To do this, the current
% value of `ex' (or \fontdimen5 of the current font) is changed to
%    height(umlautaccent) - (0.25ex + 0.20ex)
% [ ~= 1.10117ex for cm-fonts]
% The value of `0.20ex' depends on the METAFONT parameters of the
% fonts, it may vary around the value of .20ex -- just try out, which
% look the best!
%
\expandafter\ifx\csname U@D\endcsname\relax
  \csname newdimen\endcsname\U@D
\fi
\def\newumlaut#1{\leavevmode\allowhyphens{\U@D 1ex%
%       compute new ex value
  {\setbox\z@\hbox{\char127}\dimen@-.45ex\advance\dimen@\ht\z@
%       don't change, if new-ex <= old-ex
  \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}%
%       because \fontdimen changes are global, restore ex
  \accent127\fontdimen5\font\U@D #1}\allowhyphens}

\def\highumlaut#1{\leavevmode\allowhyphens
   {\accent127 #1}\allowhyphens}


%
%  Quotes
%  ------
%
\def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}%
  \setbox\z@\hbox{\dimen@\ht\z@ \advance\dimen@ -\ht\tw@
      \lower\dimen@\box\z@}%
  \ht\z@\ht\tw@ \dp\z@\dp\tw@}
% (This lowers the german left quotes to the same level as the comma.
% Use it inside a group only.)

\def\save@sf@q#1{{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
  \let\@SF\empty \fi \leavevmode #1\@SF}}

\def\@glqq{\save@sf@q{\set@low@box{''\/}\box\z@\kern-.04em\allowhyphens}}
\def\glqq{\protect\@glqq}
\def\@grqq{\save@sf@q{\kern-.07em``\kern.07em}}
\def\grqq{\protect\@grqq}
\def\@glq{\save@sf@q{\set@low@box{'\/}\box\z@\kern-.04em\allowhyphens}}
\def\glq{\protect\@glq}
\def\@grq{\save@sf@q{\kern-.0125em`\kern.07em}}
\def\grq{\protect\@grq}
\def\@flqq{\relax\ifmmode \ll \else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle \ll $}\allowhyphens}\fi}
\def\flqq{\protect\@flqq}
\def\@frqq{\relax\ifmmode \gg \else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle \gg $}\allowhyphens}\fi}
\def\frqq{\protect\@frqq}
\def\@flq{\relax\ifmmode <\else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle <$}\allowhyphens}\fi}
\def\flq{\protect\@flq}
\def\@frq{\relax\ifmmode >\else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle >$}\allowhyphens}\fi}
\def\frq{\protect\@frq}


% enable hyphenations after \ss:
\lccode`\^^Y=`\^^Y

\let\original@three=\3 % Note that \3 may be defined or undefined.

% add doublequotes to the definitions of dospecials and sanitize:
\begingroup
  \def\do{\noexpand\do\noexpand}%
  \edef\x{\endgroup
    \def\noexpand\dospecials{\dospecials\do\"}}%
\x
% not ( \ifundefined{@sanitize} or \@sanitize=\relax ) = if LaTeX
\expandafter\ifx\csname @sanitize\endcsname\relax \else
  \begingroup
    \def\@makeother{\noexpand\@makeother\noexpand}%
    \edef\x{\endgroup
      \def\noexpand\@sanitize{\@sanitize\@makeother\"}}%
  \x
\fi

\def\mdqon{\catcode`\"\active}
\def\mdqoff{\catcode`\"12 }

\def\ck{\allowhyphens\discretionary{k-}{}{c}k\allowhyphens}


%
%  active doublequote mechanism
%  ----------------------------
%
\begingroup \mdqoff
\def\x{\endgroup
  \def\@UMLAUT{\"}%
  \def\@MATHUMLAUT{\ddot}%  \mathaccent"707F
  \def\@SS{\mathchar"7019 }%
  \def\dq{"}}
\x


% Older versions of german.sty (before 2.3e incl.) don't warn about
% undefined "x sequences used by the user.  The current version allows
% three warning/error levels:
%   0... no warning/error
%   1... error when using an undefined "x sequence
%   2... same as 1, additionally warning for rarely used "x sequences
% (Remark: this is a experimental feature!)
%
\def\dqwarninglevel#1{\chardef\dq@warninglevel=#1\relax}
% intialize the warning level
\dqwarninglevel{1}


% Error and warning messages:
% TeX 3.x has an additional register containing the current input line
% number. If \on@line is undefined (it's defined in newer versions of
% `lplain'), define it.
%
\ifx\on@line\undefined
  \ifx\inputlineno\undefined \let\on@line\@empty
  \else
    \ifnum\inputlineno<\z@ \let\on@line\@empty
    \else \def\on@line{ on input line \the\inputlineno}
    \fi
  \fi
\fi

\def\@dq@error#1{%
  \errhelp{Use `` for a simple double quote character.}%
  \errmessage{german.sty: The command \dq\string#1 is undefined}}

\def\@dq@warning#1{%
   \immediate\write\sixt@@n{german.sty: %
       \dq\string#1 is possibly wrong\on@line.}}


% For all arguments of an active doublequote which should be treated in
% a special way, we define a macro with the argument text in the name.
%
% \dq@macro#1#2 constructs this name out of #2 before calling #1.
%
% - If the expansion of \dq@macro results in another call of \dq@macro
%   the inner macro shouldn't contain unexpandable primitives like
%   \relax. Otherwise TeX warns about a "Missing \endcsname inserted."
%   Example: Gr"{u"se})
% - When this macro is used in the following code, a `@' is added at
%   the end of argument #2, because we use \string in \dq@prtct to
%   protect the argument of an active doublequote (Example: "").
%
\def\dq@macro#1#2{\expandafter#1\csname @dq@\string #2@dq\endcsname}


% The definition of the active doublequote macro:
%
% If used with DC/EC-fonts, correct kerning and ligature building is
% inhibited by \protect (with meaning \relax). This is checked in
% the macro \@@@active@dq.
%
\def\@active@dq#1{%
  \dq@macro\ifx{#1@}\relax
    \ifnum\dq@warninglevel>\z@ \@dq@error{#1}\fi
    \expandafter\@normal@dq
  \else
    \expandafter\@@active@dq
  \fi {#1}}

\def\@@active@dq#1{%
  \dq@macro\ifx{#1@}\noexpand
    \expandafter\normal@dq
  \else
    \expandafter\@@@active@dq
  \fi {#1}}


% The braces of {#1} in \@active@dq are necessary if someone wants to
% define a doublequote macro for things like "{}. They ensure that
% \active@dq is called with the correct argument.
% For \normal@dq we have to delete the braces and insert a normal
% doublequote.
%
\def\normal@dq#1{\dq #1}
\def\@normal@dq#1{``#1}


% \protect (with meaning \relax) should expand to \empty.
% This is necessary to allow correct kerning and ligatures when
% these macros are used with the new DC-/EC-fonts.
% The additional hack `\dq@prtct' is necessary if \protect is set
% to \noexpand or \string (in \write and \mark commands; see
% LaTeX.tex) and the argument is an expandable token (e.g. when
% using "").
%
\def\@@@active@dq#1{\ifx\protect\relax \else
  \ifx\protect\empty \else
    \expandafter\expandafter\expandafter\protect
  \fi\fi
  \active@dq\dq@prtct{#1@}}


% \dq@prtct is used to protect the argument (with \string).
% If the "x command is written to the toc-file (in LaTeX), it is
% written and read more than once. To make sure that this is done
% properly, this macro expands to "itself" (\string\dq@prtct).
% To get rid of unwanted tokens (e.g. a possible stringified
% `\dq@prtct') in \active@dq, we use the opening brace as
% delimiter.
%
\def\dq@prtct#1#{\@dq@prtct}
\def\@dq@prtct#1{\string\dq@prtct{\string#1}}


% For combinations "x which should be treated in a special way,
% \active@dq is called with `x' as argument.
% In the current implementation the actions for argument #2 are saved
% in macros with name \dq@macro{..}{#2@}. (The `@' is inserted in
% \@@active@dq.) These macros expand to two groups containing the
% action for text and for math mode.
% The support of other ``modes'' (e.g. DC/EC-Fonts) can be implemented
% in this macro.
%
\def\active@dq#1#{\active@@dq}
\def\active@@dq#1{%
  \csname dq@\ifmmode second\else first\fi
%     \dq@macro has to be expanded three times:
%     1. \dq@macro          --> \expandafter..\csname...
%     2. \csname...         --> control seqence
%     3. control seqence    --> {text mode}{math mode}
    \expandafter\expandafter\expandafter\expandafter
  \dq@macro\endcsname{#1}}
%
\def\dq@first#1#2{#1}
\def\dq@second#1#2{#2}


% The definition of a "-macro is done with...
%
\def\def@dqmacro#1#2#3{\dq@macro\def{#1@}{{#2}{#3}}}

\def\let@dqmacro#1#2{\begingroup
  \edef\x{\endgroup \let
    \dq@macro\noexpand{#1@}\dq@macro\noexpand{#2@}}%
  \x}


% For all possible "x combinations for a hex number, we
% assign the meaning of \noexpand to the "-macro.
% These "x combinations expand to `\dq x'.
% (Remark: "A, "C, "E and "F will be redefined later.)
%
\dq@macro\let{0@}=\noexpand
\let@dqmacro{1}{0}\let@dqmacro{2}{0}\let@dqmacro{3}{0}
\let@dqmacro{4}{0}\let@dqmacro{5}{0}\let@dqmacro{6}{0}
\let@dqmacro{7}{0}\let@dqmacro{8}{0}\let@dqmacro{9}{0}
\let@dqmacro{A}{0}\let@dqmacro{B}{0}\let@dqmacro{C}{0}
\let@dqmacro{D}{0}\let@dqmacro{E}{0}\let@dqmacro{F}{0}
% For compatibility, we let "{} expand to a \dq without
% a warning.
\let@dqmacro{}{0}



% Definitions for all doublequote macros...
% (The empty groups after some macros are necessary for \write commands,
% otherwise spaces after these macros will be ignored.)
%
% umlauts:
%
\def@dqmacro{a}{\@UMLAUT a}{\@MATHUMLAUT a}
\def@dqmacro{o}{\@UMLAUT o}{\@MATHUMLAUT o}
\def@dqmacro{u}{\@UMLAUT u}{\@MATHUMLAUT u}
\def@dqmacro{A}{\@UMLAUT A}{\@MATHUMLAUT A}
\def@dqmacro{O}{\@UMLAUT O}{\@MATHUMLAUT O}
\def@dqmacro{U}{\@UMLAUT U}{\@MATHUMLAUT U}
%
% german es-zet:
%
\def@dqmacro{s}{\ss{}}{\@SS{}}
\def@dqmacro{S}{SS}{SS}
%
% special case: MASSE/Masse vs. MASZE/Ma\ss e/Ma"ze
\let@dqmacro{z}{s}
\def@dqmacro{Z}{SZ}{SZ}
%
% german and french quotes:
%
\def@dqmacro{`}{\glqq{}}{\glqq{}}
\def@dqmacro{'}{\grqq{}}{\grqq{}}
\def@dqmacro{<}{\flqq{}}{\flqq{}}
\def@dqmacro{>}{\frqq{}}{\frqq{}}
%
% tremas:
%
\def@dqmacro{e}{\highumlaut e}{\@MATHUMLAUT e}
\def@dqmacro{E}{\highumlaut E}{\@MATHUMLAUT E}
\def@dqmacro{i}{\highumlaut\i{}}{\@MATHUMLAUT\imath}
\def@dqmacro{I}{\highumlaut I}{\@MATHUMLAUT I}
%
% misc.:
%
\def@dqmacro{-}{\allowhyphens\-\allowhyphens}%
                {\allowhyphens\-\allowhyphens}
\def@dqmacro{|}{\allowhyphens
    \discretionary{-}{}{\kern.03em}\allowhyphens}{}
\def@dqmacro{"}{\hskip\z@skip}{\hskip\z@skip}
%
\def@dqmacro{~}{\leavevmode\hbox{-}}{-}
\def@dqmacro{=}{\allowhyphens-\hskip\z@skip}{\allowhyphens-\hskip\z@skip}
%
% discretionaries:
%
\def\dq@disc#1#2{\allowhyphens
  \ifnum\dq@warninglevel>\@ne \@dq@warning{#1}\fi
  \discretionary{#2-}{}{#1}\allowhyphens}
%
\def@dqmacro{c}{\dq@disc ck}{c}
\def@dqmacro{C}{\dq@disc CK}{C}
\def@dqmacro{f}{\dq@disc f{ff}}{f}
\def@dqmacro{F}{\dq@disc F{FF}}{F}
\def@dqmacro{l}{\dq@disc l{ll}}{l}
\def@dqmacro{L}{\dq@disc L{LL}}{L}
\def@dqmacro{m}{\dq@disc m{mm}}{m}
\def@dqmacro{M}{\dq@disc M{MM}}{M}
\def@dqmacro{n}{\dq@disc n{nn}}{n}
\def@dqmacro{N}{\dq@disc N{NN}}{N}
\def@dqmacro{p}{\dq@disc p{pp}}{p}
\def@dqmacro{P}{\dq@disc P{PP}}{P}
\def@dqmacro{t}{\dq@disc t{tt}}{t}
\def@dqmacro{T}{\dq@disc T{TT}}{T}


%
%  Dates and Captions
%  ------------------
%
\def\month@german{\ifcase\month \or
  Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
  Juli\or August\or September\or Oktober\or November\or Dezember\fi}
\def\dategerman{\def\today{\number\day.~\month@german
  \space\number\year}}
\def\dateaustrian{\def\today{\number\day.~\ifnum 1=\month
  J\"anner\else \month@german\fi \space\number\year}}
\def\month@english{\ifcase\month \or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi}
\def\dateUSenglish{\def\today{\month@english
  \space\number\day, \number\year}}
\def\dateenglish{\def\today{\number\day \ifcase\day \or
  st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or %  1..10
  th\or th\or th\or th\or th\or th\or th\or th\or th\or th\or % 11..20
  st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or % 21..30
  st\fi
  ~\month@english \space\number\year}}
\def\datefrench{\def\today{\number\day \ifnum1=\day \/$^{\rm er}$\fi
  \space\ifcase\month \or
  janvier\or f\'evrier\or mars\or avril\or mai\or juin\or
  juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre\fi
  \space\number\year}}


% Here is, how you can modify the LaTeX document style files and option
% files, to benefit from the following \captionsxxx commands. Def's like
%  \def\tableofcontents{\section*{Contents\markboth{CONTENTS}{CONTENTS}}
%  \@starttoc{toc}}
% should be redefined by def's like
%  \def\contentsname{Contents} % <---
%  \def\tableofcontents{\section*{\contentsname
%  \markboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}
%  \@starttoc{toc}}
% (it's best to put all these new lines to the end of the original
% files), and of course, you should modify the change date in the file
% header and in the \typeout command.
%
% You need not do this yourself - rather, retrieve the new LaTeX 2.09
% distribution of December 1991 (or newer).

\def\captionsgerman{%
\def\prefacename{Vorwort}%
\def\refname{Literatur}%
\def\abstractname{Zusammenfassung}%
\def\bibname{Literaturverzeichnis}%
\def\chaptername{Kapitel}%
\def\appendixname{Anhang}%
\def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt
\def\listfigurename{Abbildungsverzeichnis}%
\def\listtablename{Tabellenverzeichnis}%
\def\indexname{Index}%
\def\figurename{Abbildung}%
\def\tablename{Tabelle}%  % oder: Tafel
\def\partname{Teil}%
\def\enclname{Anlage(n)}% % oder: Beilage(n)
\def\ccname{Verteiler}%   % oder: Kopien an
\def\headtoname{An}%
\def\pagename{Seite}%
\def\seename{siehe}%
\def\alsoname{siehe auch}}

\let\captionsaustrian=\captionsgerman

\def\captionsenglish{%
\def\prefacename{Preface}%
\def\refname{References}%
\def\abstractname{Abstract}%
\def\bibname{Bibliography}%
\def\chaptername{Chapter}%
\def\appendixname{Appendix}%
\def\contentsname{Contents}%
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\indexname{Index}%
\def\figurename{Figure}%
\def\tablename{Table}%
\def\partname{Part}%
\def\enclname{encl}%
\def\ccname{cc}%
\def\headtoname{To}%
\def\pagename{Page}%
\def\seename{see}%
\def\alsoname{see also}}

\let\captionsUSenglish=\captionsenglish

\def\captionsfrench{%
\def\prefacename{Pr\'eface}%
\def\refname{R\'ef\'erences}%
\def\abstractname{R\'esum\'e}%
\def\bibname{Bibliographie}%
\def\chaptername{Chapitre}%
\def\appendixname{Annexe}%
\def\contentsname{Table des mati\`eres}%
\def\listfigurename{Liste des figures}%
\def\listtablename{Liste des tableaux}%
\def\indexname{Index}%
\def\figurename{Figure}%
\def\tablename{Tableau}%
\def\partname{Partie}%
\def\enclname{P.~J.}%
\def\ccname{Copie \`a}%
\def\headtoname{A}%
\def\pagename{Page}%
\def\seename{voir}%
\def\alsoname{voir aussi}}%

%
%  Language Specific Settings
%  --------------------------
%
\let\extrasUSenglish=\relax \let\noextrasUSenglish=\empty
\let\extrasenglish=\relax \let\noextrasenglish=\empty
\def\extrasgerman{\frenchspacing
  \lefthyphenmin\tw@ \righthyphenmin\tw@}
\def\noextrasgerman{%
  \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi
  \lefthyphenmin\the\lefthyphenmin \righthyphenmin\the\righthyphenmin}
\let\extrasaustrian=\extrasgerman \let\noextrasaustrian=\noextrasgerman
\def\extrasfrench{\frenchspacing}
\def\noextrasfrench{%
  \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi}

%
%  Switching Languages
%  -------------------
%
% If TeX version 2.x is used and/or the appropriate \language values
% for the hyphenation patterns loaded with IniTeX are not given,
% provide default values.  (The default values are:
% USenglish=english=0, german=austrian=1, french=2.)
%
\expandafter\ifx\csname l@english\endcsname\relax
  \expandafter\ifx\csname l@USenglish\endcsname\relax
    \chardef\l@english=0
  \else
    \chardef\l@english=\l@USenglish
  \fi
\fi
\expandafter\ifx\csname l@USenglish\endcsname\relax
  \chardef\l@USenglish=\l@english
\fi
%
\expandafter\ifx\csname l@german\endcsname\relax
  \expandafter\ifx\csname l@austrian\endcsname\relax
    \chardef\l@german=1
  \else
    \chardef\l@german=\l@austrian
  \fi
\fi
\expandafter\ifx\csname l@austrian\endcsname\relax
  \chardef\l@austrian=\l@german
\fi
%
\expandafter\ifx\csname l@french\endcsname\relax
  \chardef\l@french=2 % incompatible with older versions
\fi


\let\original@TeX=\relax

\def\p@selectlanguage#1{\relax \original@TeX
  \expandafter\ifx\csname l@#1\endcsname\relax
    \errhelp{Your command will be ignored, type <return> to proceed}%
    \errmessage{You haven't defined the language #1 yet}%
  \else
    \edef\original@TeX{\csname noextras#1\endcsname
                       \let\noexpand\original@TeX\relax}%
    \csname date#1\endcsname
    \csname captions#1\endcsname
    \csname extras#1\endcsname
    \language \csname l@#1\endcsname\relax
  \fi}

\def\selectlanguage#1{\protect\p@selectlanguage{%
  \ifnum\escapechar=\expandafter`\string#1\empty
  \else \string#1\empty\fi}}

%
%  TeX 2/TeX 3 compatibility
%  -------------------------
%
%  If \language has not yet been declared neither by Ferguson's
%  ``Multilingual T^eX'' nor by TeX 3, allocate a counter:
%
% \ifundefined{language}
\expandafter\ifx\csname language\endcsname\relax
  \csname newcount\endcsname\language
\fi
%
%  TeX 3 introduces two new internal count registers.
%  If not defined, allocate two count registers:
%
\expandafter\ifx\csname lefthyphenmin\endcsname\relax
  \csname newcount\endcsname\lefthyphenmin
\fi
\expandafter\ifx\csname righthyphenmin\endcsname\relax
  \csname newcount\endcsname\righthyphenmin
\fi
%
%  TeX 3 has another new primitive: \setlanguage. It can be used
%  only in hmode and has ``real'' effects in inner mode only!
%  If not defined, try to simulate TeX 3's \setlanguage.
%
% \ifundefined{setlanguage} (= TeX version < 3 )
\expandafter\ifx\csname setlanguage\endcsname\relax
  \def\setlanguage{\relax
    \ifhmode \else
      \errhelp{Use \selectlanguage to switch languages.}%
      \errmessage{\setlanguage allowed only in horizontal mode}%
    \fi
    \begingroup\afterassignment\endgroup\count@=}
\fi


\begingroup \mdqon
\def\x{\endgroup
  \def\originalTeX{\mdqoff \let"\dq \umlauthigh \let\3\original@three
    \selectlanguage{USenglish}}
  \def\germanTeX{\mdqon \let"\@active@dq \umlautlow \let\3\ss
    \selectlanguage{german}}}
\x


\catcode`\@=\atcode % return to previous catcode

% Now, switch on what is appropriate for german:
%
\germanTeX

% This is the end of GERMAN.STY/TEX.
\input atari
\endinput

